There is a known optical device in which a through hole is formed in a case accommodating an optical element and an optical fiber inserted through the through hole is connected to the optical element. In the optical device, the through hole through which the optical fiber is inserted is sealed by solder (for example, see Japanese Patent Nos. 2943760 and 2800760).